// pages/power/power.js
Page({
  onLoad: function (options) {     
  },
  onShow: function () {
    wx.getSetting({
      success: (result)=>{
        console.log(result);
        if(result.authSetting['scope.userLocation']){
          wx.switchTab({
            url: '/pages/index/index',
            success: (result)=>{
              
            },
            fail: ()=>{},
            complete: ()=>{}
          });
        }
      },
      fail: ()=>{},
      complete: ()=>{}
    });
  },

  
})